import java.io.UnsupportedEncodingException;
import java.net.InetAddress;
import java.net.UnknownHostException;


public class TestDNS {

	/**
	 * @param args
	 */
	public static void main(String[] args) {	
		try {
			InetAddress addr=InetAddress.getByName("194.186.60.107");
			System.out.printf("%s  %s \n",addr.getHostName(), addr.getHostAddress());
		} catch (UnknownHostException  e) {
			e.printStackTrace();
		}		
	/*	InetAddress address=null;
		String domainName=null;
		System.out.printf("Please enter domain name \n");
		Scanner  input = new Scanner(System.in); 
		try {
			domainName=input.nextLine();
		} catch (Exception e) {			
			e.printStackTrace();
		}
		finally{input.close();}
		try {
			address= InetAddress. getByName(domainName);
		} catch (UnknownHostException e) {
			e.printStackTrace(System.err);
		}
		System.out.printf("%s  %s \n",address.getHostName(), address.getHostAddress());*/
	}

}
